package com.qf.wangqing.sportsnews.adapter.matchsecond;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/12/19.
 */

public class MatchsecondpagerAdapter extends FragmentPagerAdapter {
    private List<Fragment>fragmentList;

    public MatchsecondpagerAdapter(FragmentManager fm, List<Fragment> fragmentList) {
        super(fm);
        this.fragmentList = fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        List<String>list = new ArrayList<>();
        list.add("直播");
        list.add("数据");
        list.add("聊天室");
        return list.get(position);
    }
}
